package com.jml.适配器Adapt008.adapter.impl;


import com.jml.适配器Adapt008.adapter.HandlerAdapter;
import com.jml.适配器Adapt008.controller.impl.AnnotationHandler;

/**
 * @author:jml
 * @date: 2019/11/11 15:34
 * @description：适配器子类
 */
public class AnnotationHandlerAdapter implements HandlerAdapter {
    
    /**
     * 注解形式的适配器
     * @param handler
     * @return
     */
    @Override
    public boolean supports(Object handler) {
        return (handler instanceof AnnotationHandler);
    }

    @Override
    public void handle(Object handler) {
        ((AnnotationHandler) handler).handler();
    }
}
